<template>
  <Api ref="apiRef" :input="{ mainId }" :load="findInvoiceLinesByMainId" type="Array">
    <Table>
      <TableColumn field="chargeCode" title="收费代码" :width="110" />
      <TableColumn field="charge" title="收费项目" :width="100" />
      <TableColumn field="name" title="名称" :width="100" />
      <TableColumn field="code" title="代码" :minWidth="100" />
      <TableColumn field="spec" title="规格" :width="100" />
      <TableColumn field="unit" title="单位" :width="70" />
      <TableColumn field="qty" title="数量" :width="80" />
      <TableColumn field="price" title="价格" :width="100" align="right" />
      <TableColumn field="amt" title="金额" :width="100" align="right" />
      <TableColumn field="remark" title="备注" :width="100" />
    </Table>
  </Api>
</template>
<script setup lang="ts">
import { Api } from '@idmy/core'
import { Table, TableColumn } from '@idmy/ui'
import { findInvoiceLinesByMainId } from '@/views/Invoice/services'

defineProps({
  mainId: { type: Number, required: true },
})
</script>
